package com.example.demo.jmeter;

/**
 * @program: demo
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2022-05-13 14:44
 **/

public class HTTPSampler {

    private String domain;
    private String port;
    private String protocol;
    private String path;
    private String method;

    public HTTPSampler() {
    }

    public HTTPSampler(String domain, String path) {
        this.domain = domain;
        this.path = path;
        this.port = "80";
        this.protocol = "http";
        this.method = "GET";
    }

    public HTTPSampler(String domain, String port, String path) {
        this.domain = domain;
        this.port = port;
        this.path = path;
        this.protocol = "http";
        this.method = "GET";
    }

    public HTTPSampler(String domain, String port, String protocol, String path, String method) {
        this.domain = domain;
        this.port = port;
        this.protocol = protocol;
        this.path = path;
        this.method = method;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    @Override
    public String toString() {
        return method + " " + protocol + "://" + domain + ":" + port + path;
    }
}
